package com.study.dubbo.consumer.controller;

import com.study.dubbo.consumer.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yuantongqin
 * 2022/2/25
 */
@RestController
public class TestController {


    @Autowired
    TestService testService;

    @GetMapping("/hello")
    public String hello(String hello){
        String test = testService.test(hello);
        return test;
    }


    @PostMapping("/word")
    public String word(Integer word){
        String w = word + "hhh";
        return w;
    }


}
